package pzl.com.library.renderer;

import android.graphics.Canvas;

import pzl.com.library.chart.IChart;

/**
 * @author zl.peng
 * @version [1.0, 2016-12-07]
 *          <p/>
 *          线状坐标轴渲染器
 */
public class LineAxisRenderer extends BaseAxisRenderer {
    public static final int DIRECTION_TOP = 1;
    public static final int DIRECTION_BOTTOM = 2;
    public static final int DIRECTION_LEFT = 3;
    public static final int DIRECTION_RIGHT = 4;

    private int mDirection;


    @Override
    public void drawAxis(Canvas canvas, IChart chart) {
        if (!checkDirection(mDirection)) return;

    }

    public int getDirection() {
        return mDirection;
    }

    public void setDirection(int direction) {
        if (!checkDirection(direction)) throw new IllegalStateException("错误的方向");
        mDirection = direction;
    }

    private boolean checkDirection(int direction) {
        return direction >= 1 && direction <= 4;
    }

}
